\hypertarget{class_game_level}{
\section{GameLevel Class Reference}
\label{class_game_level}\index{GameLevel@{GameLevel}}
}


Provides game data for each level and scales the game data according to difficulty settings.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_game_level_ab0b035503de469811c7574b01f92e75f}{GameLevel} (int, QObject $\ast$parent=0)
\begin{DoxyCompactList}\small\item\em Constructor of \hyperlink{class_game_level}{GameLevel} class. \item\end{DoxyCompactList}\item 
int \hyperlink{class_game_level_ac3ac1851bae092c86df619cf73ef4d8e}{currentLevel} () const 
\begin{DoxyCompactList}\small\item\em Current level number. \item\end{DoxyCompactList}\item 
void \hyperlink{class_game_level_ae804e1db16825463ed1cba7136f5aeab}{setCurrentLevel} (int level)
\begin{DoxyCompactList}\small\item\em Sets the current level. \item\end{DoxyCompactList}\item 
void \hyperlink{class_game_level_a89cc3c5955eb9966e8c8ef6c7e4a629c}{nextLevel} (\hyperlink{struct_game_level_data}{GameLevelData} \&, int $\ast$)
\begin{DoxyCompactList}\small\item\em Initializes the game data for next game level. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_game_level_a066f2e73b3f4fa2f3d1576bc022e83d8}{
void \hyperlink{class_game_level_a066f2e73b3f4fa2f3d1576bc022e83d8}{newRound} ()}
\label{class_game_level_a066f2e73b3f4fa2f3d1576bc022e83d8}

\begin{DoxyCompactList}\small\item\em Initializes a new round with increased difficulty. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_level_aca629b96870f97fe36512357b4b016bb}{
void \hyperlink{class_game_level_aca629b96870f97fe36512357b4b016bb}{createData} ()}
\label{class_game_level_aca629b96870f97fe36512357b4b016bb}

\begin{DoxyCompactList}\small\item\em Provides game data for each level. \item\end{DoxyCompactList}\item 
void \hyperlink{class_game_level_ae6ff397678a8fe72129686b160505aec}{scaleDifficulty} (int)
\begin{DoxyCompactList}\small\item\em Scales the difficulty from int to float. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Provides game data for each level and scales the game data according to difficulty settings. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_game_level_ab0b035503de469811c7574b01f92e75f}{
\index{GameLevel@{GameLevel}!GameLevel@{GameLevel}}
\index{GameLevel@{GameLevel}!GameLevel@{GameLevel}}
\subsubsection[{GameLevel}]{\setlength{\rightskip}{0pt plus 5cm}GameLevel::GameLevel (
\begin{DoxyParamCaption}
\item[{int}]{ difficulty, }
\item[{QObject $\ast$}]{ parent = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}explicit\mbox{]}}}}
\label{class_game_level_ab0b035503de469811c7574b01f92e75f}


Constructor of \hyperlink{class_game_level}{GameLevel} class. 


\begin{DoxyParams}{Parameters}
\item[{\em difficulty}]Difficulty level from settings (1 = easy, 2 = normal, 3 = hard) \item[{\em parent}]Parent object \end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{class_game_level_ac3ac1851bae092c86df619cf73ef4d8e}{
\index{GameLevel@{GameLevel}!currentLevel@{currentLevel}}
\index{currentLevel@{currentLevel}!GameLevel@{GameLevel}}
\subsubsection[{currentLevel}]{\setlength{\rightskip}{0pt plus 5cm}int GameLevel::currentLevel (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_game_level_ac3ac1851bae092c86df619cf73ef4d8e}


Current level number. 

\begin{DoxyReturn}{Returns}
Current level number 
\end{DoxyReturn}
\hypertarget{class_game_level_a89cc3c5955eb9966e8c8ef6c7e4a629c}{
\index{GameLevel@{GameLevel}!nextLevel@{nextLevel}}
\index{nextLevel@{nextLevel}!GameLevel@{GameLevel}}
\subsubsection[{nextLevel}]{\setlength{\rightskip}{0pt plus 5cm}void GameLevel::nextLevel (
\begin{DoxyParamCaption}
\item[{{\bf GameLevelData} \&}]{ copy, }
\item[{int $\ast$}]{ progressData}
\end{DoxyParamCaption}
)}}
\label{class_game_level_a89cc3c5955eb9966e8c8ef6c7e4a629c}


Initializes the game data for next game level. 

Array {\ttfamily GameEngine::currentLevelProgress} contains the current level progress value in index 0 and the maximum progress value in index 1. Progress points are counted as follows:


\begin{DoxyItemize}
\item splitting a large asteroid: +1 progress point.
\item splitting three medium asteroids: +1x3 progress point.
\item collecting the resulting minerals: +4x3 progress point.
\end{DoxyItemize}

There are +16 progress points in each large asteroid. The maximum progress for level is $16 * a$, where $a$ is amount of large asteroids for the level.


\begin{DoxyCode}
\end{DoxyCode}



\begin{DoxyParams}{Parameters}
\item[{\em copy}]The structure to store the level data \item[{\em progressData}]The maximum progress will be calculated to index 1 and current progress will be reset to 0. \end{DoxyParams}
\hypertarget{class_game_level_ae6ff397678a8fe72129686b160505aec}{
\index{GameLevel@{GameLevel}!scaleDifficulty@{scaleDifficulty}}
\index{scaleDifficulty@{scaleDifficulty}!GameLevel@{GameLevel}}
\subsubsection[{scaleDifficulty}]{\setlength{\rightskip}{0pt plus 5cm}void GameLevel::scaleDifficulty (
\begin{DoxyParamCaption}
\item[{int}]{ d}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_game_level_ae6ff397678a8fe72129686b160505aec}


Scales the difficulty from int to float. 


\begin{DoxyParams}{Parameters}
\item[{\em d}]Difficulty from settings (1 = easy, 2 = normal, 3 = hard). \end{DoxyParams}
\hypertarget{class_game_level_ae804e1db16825463ed1cba7136f5aeab}{
\index{GameLevel@{GameLevel}!setCurrentLevel@{setCurrentLevel}}
\index{setCurrentLevel@{setCurrentLevel}!GameLevel@{GameLevel}}
\subsubsection[{setCurrentLevel}]{\setlength{\rightskip}{0pt plus 5cm}void GameLevel::setCurrentLevel (
\begin{DoxyParamCaption}
\item[{int}]{ level}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_game_level_ae804e1db16825463ed1cba7136f5aeab}


Sets the current level. 


\begin{DoxyParams}{Parameters}
\item[{\em level}]Level number \end{DoxyParams}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
\hyperlink{gamelevel_8h}{gamelevel.h}\item 
gamelevel.cpp\end{DoxyCompactItemize}
